import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect:'/first'
},{
    path: '/first',
	component: () => import('../views/First.vue'),
	children:[{
		path:'/first',
		redirect:'/first/home'
	},{
		path:'/first/home',
		component:()=>import('../views/Home.vue')
	},{
		path:'/first/shop',
		component:()=>import('../views/Shop.vue')
	},{
		path:'/first/my',
		component:()=>import('../views/My.vue')
	}]
},{
    path: '/login',
    component: () => import('../views/Login.vue')
},{
    path: '/detail',
    component: () => import('../views/Detail.vue')
},{
	path:'/classify',
	component:()=>import('../views/Classify.vue')
}]

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
})

export default router
